# coding=utf-8
# send的作用是唤醒并继续执行，发送一个信息到生成器内部
def foo():
  print("start")
  i = 0
  while i<2:
    temp = yield i
    print(f"temp:{temp}")
    i=i+1
  print("end")

g = foo()
print(next(g))
print("*"*20)
print(g.send(100))
print(next(g))

